Interface DNSClient

All Superinterfaces:
IPCObject, Process
All Known Implementing Classes:
DNSClientImpl

public interface DNSClient extends Process
Information provided by the PKI file:

    \class DnsClient
    
    \brief DnsClient is the process that handles retrieving DNS lookups.
    
    \example network().getDevice("PC0").getProcess("DnsClient")
    
Author:
Auto-generated
  • Method Details

    • addIpAddress

      boolean addIpAddress(String hostname, IPAddress ipAddress)
      Information provided by the PKI file:
      
          \brief Adds a DNS entry with the specified hostname and IP address to the DNS table.
          
          \param hostname, the hostname of the node.
          \param ipAddress, the IP address of the node.
          
          \return bool, true if successful, otherwise false.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
      ipAddress - Takes in a parameter of ipAddress
      Returns:
      boolean Returns a boolean
    • removeIpAddress

      void removeIpAddress(String hostname)
      Information provided by the PKI file:
      
          \brief Removes the DNS entry from the table based on the hostname.
          
          \param hostname, the hostname associated with the IP address to remove.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
    • removeIp

      void removeIp(String hostname, IPAddress ipAddress)
      Information provided by the PKI file:
      
          \brief Removes the DNS entry from the table based on the hostname and the IP address.
          
          \param hostname, the hostname of the node.
          \param ipAddress, the IP address of the node.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
      ipAddress - Takes in a parameter of ipAddress
    • isValidName

      boolean isValidName(String hostname)
      Information provided by the PKI file:
      
          Returns true if the hostname is a valid name (non-special characters), otherwise false.
          
          \param hostname, the hostname of interest.
          
          \return bool, true if the hostname is a valid name (non-special characters), otherwise false.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
      Returns:
      boolean Returns a boolean
    • setServerIp

      void setServerIp(IPAddress ipAddress)
      Information provided by the PKI file:
      
          \brief Sets the IP address of the DNS server.
          
          \param ipAddress, the DNS server IP address.
          
              
      Parameters:
      ipAddress - Takes in a parameter of ipAddress
    • getServerIp

      IPAddress getServerIp()
      Information provided by the PKI file:
      
          \brief Returns the IP address of the DNS server.
          
          \return ip, the DNS server ip address.
          
              
      Returns:
      IPAddress Returns a IPAddress
    • getServerIpv6

      IPV6Address getServerIpv6()
      Information provided by the PKI file:
      
          \brief Returns the IPv6 address of the DNS server.
          
          \return ipv6, the DNS server ipv6 address.
          
              
      Returns:
      IPV6Address Returns a IPV6Address
    • setServerIpv6

      void setServerIpv6(IPV6Address ipAddress)
      Information provided by the PKI file:
      
          \brief Sets the IPv6 address of the DNS server.
          
          \param ipAddress, the DNS server IPv6 address.
          
              
      Parameters:
      ipAddress - Takes in a parameter of ipAddress
    • setEnabled

      void setEnabled(boolean bEnable)
      Information provided by the PKI file:
      
          \brief Enable or disable Dns Client Process
          
          \param bEnable, true to enable, otherwise false.
          
              
      Parameters:
      bEnable - Takes in a parameter of bEnable
    • isEnabled

      boolean isEnabled()
      Information provided by the PKI file:
      
          \brief Returns true if this DNS client process is enabled, otherwise false.
          
          \return bool, true if this DNS client process is enabled, otherwise false.
          
              
      Returns:
      boolean Returns a boolean
    • getStrToIpCount

      int getStrToIpCount()
      Information provided by the PKI file:
      
          \brief Returns the number of DNS entries in the DNS table.
          
          \return int, the number of DNS entries in the DNS table.
          
              
      Returns:
      int Returns a int
    • getHostAt

      String getHostAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the hostname at the specified index.
          
          \param index, the index of the hostname of interest.
          
          \return string, the hostname at the specified index.
          
              
      Parameters:
      index - Takes in a parameter of index
      Returns:
      String Returns a String
    • isHostNameExisted

      boolean isHostNameExisted(String hostname)
      Information provided by the PKI file:
      
          \brief Returns true if the hostname exists in the DNS table, otherwise false.
          
          \param hostname, the hostname of interest.
          
          \return bool, true if the hostname exists in the DNS table, otherwise false.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
      Returns:
      boolean Returns a boolean
    • isIpExisted

      boolean isIpExisted(String hostname, IPAddress ipAddress)
      Information provided by the PKI file:
      
          \brief Returns true if the hostname and IP address DNS entry exists, otherwise false.
          
          \param hostname, the hostname to lookup.
          \param ipAddress, the IP address to lookup.
          
          \return bool, true if the hostname and IP address entry exists, otherwise false.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
      ipAddress - Takes in a parameter of ipAddress
      Returns:
      boolean Returns a boolean
    • getIpOfHost

      List<IPAddress> getIpOfHost(String hostname)
      Information provided by the PKI file:
      
          \brief Returns a list of IP addresses associated with the specified hostname.
          
          \param hostname, the hostname of interest.
          
          \return vector<ip>, the list of IP addresses associated with the specified hostname.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
      Returns:
      List<IPAddress> Returns a List<IPAddress>